<template>
    <div class="uint-header" @click="dropDown">
        <span class="lf">{{unitName || "全部"}}({{total||0}}人)</span>
        <span class="rt xiala" ><i class="icon-dropdowm"></i></span>
        <!--<span class="rt xiala"><i><img src="/static/imgs/xiala.png" alt=""></i></span>-->
        <v-mask 
         :showMask.sync="showMask"
         ></v-mask>
    </div>
</template>
<script>
import Mask from "@/components/personal/mask";
import Bus from '@/common/js/vueBus'
export default {
  data() {
    return {
      value: '',
      showMask: false,
      unitName:'',
      total:0
    }
  },
 
  mounted(){
    Bus.$on('total',data => this.total = data)
    Bus.$on('maskLabel',data => this.unitName = data) 
  },
  methods: {
  
    dropDown() {

      this.showMask = true;
     
    },
    getMaskData(data) {
      if (data === "全部") {
        this.unitName = "";
      } else {
        this.unitName = data;
      }
    }
    
  },
  components: {
    "v-mask": Mask
  }

};
</script>
<style scoped>
div.uint-header {
  line-height: 0.72rem;
  height: 0.72rem;
  position: relative;
  background: #fff;
  margin-top:0.2rem;
}

.uint-header {
  height: 0.72rem;
}
.uint-header img {
  width: 0.28rem;
  height: 0.28rem;
}
</style>

